package com.deer.wms.base.system.service.zh.impl;

import cn.hutool.core.convert.Convert;
import com.deer.wms.base.system.dao.zh.DefectsTypeMapper;
import com.deer.wms.base.system.model.zh.DefectsType;
import com.deer.wms.base.system.service.zh.DefectsTypeService;
import com.deer.wms.base.system.service.zh.QualityService;
import com.deer.wms.common.core.service.AbstractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 李帅辰
 * @date 2021/5/29 17:47
 */
@Service
public class DefectsTypeServiceImpl extends AbstractService<DefectsType,Integer> implements DefectsTypeService {
    @Autowired
    private DefectsTypeMapper defectsTypeMapper;

    @Override
    public DefectsType findDefectsTypeById(Integer defectsId) {
        return defectsTypeMapper.findDefectsTypeById(defectsId);
    }

    @Override
    public List<DefectsType> findDefectsTypeList(DefectsType defectsType) {
        return defectsTypeMapper.findDefectsTypeList(defectsType);
    }

    @Override
    public int delectDefectsTypeById(Integer defectsId) {
        return defectsTypeMapper.delectDefectsTypeById(defectsId);
    }

    @Override
    public int delectDefectsTypeByIds(String ids) {
        return defectsTypeMapper.delectDefectsTypeByIds(Convert.toStrArray(ids));//
    }

    @Override
    public int saveDefectsType(DefectsType defectsType) {
        return defectsTypeMapper.saveDefectsType(defectsType);
    }

    @Override
    public int updateDefectsType(DefectsType defectsType) {
        return defectsTypeMapper.updateDefectsType(defectsType);
    }
}
